import request from "@/utils/request.js";

/**
 * 绑定当前用户二维码
 *
 */
export function bindMyQRCode(code) {
    return request.post(`user/bind/family/bind/user?code=${code}` );
}

/**
 * 获取当前用户二维码
 *
 */
export function getMyQRCode(data) {
    return request.get(`user/bind/family/generate/qrcode`, data);
}

/**
 * 已学课程
 *
 */
export function getMyRelationApi() {
    return request.get(`user/bind/family/get/bind/user`);
}

/**
 * 切换绑定用户
 *
 */
export function switchBindUser(userId) {
    return request.get(`user/bind/family/switch/bind/user?userId=${userId}`);
}

/**
 * 解除绑定关系
 *
 */
export function unBindRelationApi(data) {
    return request.get(`user/bind/family/unbind/user` , data);
}

/**
 * 未读消息
 *
 */
// export function unreadMessage() {
//     return request.get(`user/bind/family/get/unread/message` );
// }

/**
 * 未读消息
 *
 */
export function bindFamilyAuditApply(applyId,agree) {
    return request.get(`user/bind/family/audit/apply?applyId=${applyId}&agree=${agree}` );
}